package io.github.talelin.latticy.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import io.github.talelin.latticy.dto.rule.ruleKey.RuleFieldDTO;
import io.github.talelin.latticy.dto.rule.ruleKey.RuleKeyDTO;
import io.github.talelin.latticy.model.RuleKeyDO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author generator@wulongbo
 * @since 2022-08-23
 */
public interface RuleKeyService extends IService<RuleKeyDO> {

    /**
     * 添加ruleKey
     * @return 是否成功
     */
    boolean addRuleKey(RuleKeyDTO dto);

    /**
     * 修改ruleKey
     * @return 是否成功
     */
    boolean updateRuleKeyById(RuleKeyDTO dto,Integer id);

    /**
     * 删除ruleKey
     * @return 是否成功
     */
    boolean deleteRuleKeyById(Integer id);

    /**
     * 查询ruleKey
     * @return
     */
    RuleKeyDO getRuleKeyById(Integer id);

    List<RuleKeyDO> getRuleKeyList(RuleFieldDTO validator);

    /**
     * 查询所有规则key
     * @param count
     * @param page
     * @return
     */
    IPage<RuleKeyDO> getRuleKeyPage(Integer page, Integer count,Integer feesBizType, Integer level, Integer type, Integer frameType);
}
